package com.girl.girl.exception;

import com.girl.girl.domain.Result;
import com.girl.girl.enums.ResultEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by qxl on
 * 2018/7/3
 */
public class GilrException extends RuntimeException {


    private Integer code;
    private String Msg;

    public GilrException(){

    }
    public GilrException(ResultEnum resultEnum){
       super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return Msg;
    }

    public void setMsg(String msg) {
        Msg = msg;
    }
}
